import request from '@/axios'
import { ASRType } from './types'

export const getASRListApi = (params: any) => {
  return request.get<ASRType[]>({ url: '/check/asr', params })
}

export const addASRApi = (data: any) => {
  return request.post({ url: '/check/asr', data })
}

export const putASRApi = (data: any) => {
  return request.put({ url: `/check/asr/${data.id}`, data })
}

export const putASRStatusApi = (data: any) => {
  return request.put({ url: `/check/asr/${data.id}/status`, data })
}

export const putASRErratumApi = (data: any) => {
  return request.put({ url: `/check/asr/${data.id}/erratum`, data })
}

export const getASRApi = (data: any) => {
  return request.get({ url: `/check/asr/${data.id}` })
}

export const deleteASRApi = (ids: string[] | number[]) => {
  return request.delete({ url: '/check/asr', data: ids })
}

export const updateASRStampApi = (id: any, data) => {
  return request.put({ url: `/check/asr/${id}/stamp`, data })
}

export const deleteASRContentApi = (ids: string[] | number[]) => {
  return request.delete({ url: '/check/asr/content', data: ids })
}

export const updateASRContentStampApi = (ids: string[] | number[]) => {
  return request.put({ url: '/check/asr/content/stamps', data: ids })
}
